Don't hide foreign children when emulating visibility
authorAlexander Larsson <alexl@redhat.com>
Fri, 26 Jun 2009 18:11:57 +0000 (20:11 +0200)
committerAlexander Larsson <alexl@redhat.com>
Fri, 26 Jun 2009 18:11:57 +0000 (20:11 +0200)
commit64e7c7828d951953708248b21b1541058067c702
tree8c68e66c5e280efc5051c4024b67faa53f0e4bd6
parentc84c0e92f8c80ef0d75a05f1bea94c21a6020674
Don't hide foreign children when emulating visibility

We emulate visibility by unmapping (in X) all mapped (according to
gdk) windows that are not visible (all parents mapped). This is because
there may be client side windows inbetween the native windows in the
hierarchy, so you can't know a native window is visible just because
all the parent native windows are mapped.

However, we don't want to unmap foreign windows, as that may cause all
sort of unexpected issues. This should be safe, because generally the
parent of a foreign window is a native window (e.g. a socket), so its
gdk visibility state is the same as the Xserver one.

This fixes an issue with the GDM notification area where the unmap of
the plug caused spurious UnmapNotify events that confused GtkSocket and
caused icons to become one pixel wide.
gdk/gdkwindow.c